#!/usr/bin/env python3
from dotenv import load_dotenv
from src.ChatDoc import ChatDoc
load_dotenv()
import os
import logging


def main():
    chat_doc = ChatDoc()
    chat_doc.doc = "/Users/mac/Documents/python/chatdoc/test.pdf"
    chat_doc.splitSentence()

    logging.basicConfig(level=logging.INFO)
    logging.getLogger("langchain.retrievers.multi_query").setLevel(logging.DEBUG)
    result = chat_doc.chatWithDoc("总结文中重点，以markdown格式输出")
    logging.info(result)

if __name__ == "__main__":
    main()